﻿namespace Common.Core.DTO
{
    /// <summary>
    /// 定义输入DTO
    /// </summary>
    public interface IArgs
    {
    }

    /// <summary>
    /// 入参基类
    /// </summary>
    public class BaseArgs: IArgs
    {
        string token = "";
        /// <summary>
        /// token内部通信密钥值
        /// </summary>
        public string Token { get { return token; } set { token = value; } }

        string sourceFrom = "";
        /// <summary>
        /// 来源应用
        /// </summary>
        public string SourceFrom { get { return sourceFrom; } set { sourceFrom = value; } }
    }
    /// <summary>
    /// 只有主键时的基类
    /// </summary>
    public class IdBaseArgs : BaseArgs
    {
        long id = 0;
        /// <summary>
        /// id
        /// </summary>
        public long Id { get { return id; } set { id = value; } }
    }
    /// <summary>
    /// RSA密文基类，一般用于加密文本
    /// </summary>
    public class CipherBaseArgs : BaseArgs
    {
        string publicKey = "";
        /// <summary>
        /// 公钥
        /// </summary>
        public string PublicKey { get { return publicKey; } set { publicKey = value; } }

        string text = "";
        /// <summary>
        /// 密文
        /// </summary>
        public string Text { get { return text; } set { text = value; } }
    }
}
